package com.jobpass.controller;

import com.jobpass.common.data.ResultData;
import com.jobpass.common.model.Journalism;
import com.jobpass.common.service.JournalismService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: Qning
 * @Description: 新闻类
 * @Date: 2020/7/18 18:47
 * @PackageName: com.jobpass.controller
 * @ClassName: RecruitController
 */
@Api(tags="新闻Controller")
@RestController
@RequestMapping("student")
public class JournalismController {

    @Resource
    private JournalismService journalismService;

    /**
     *
     * @Author: Qning
     * @Description:新闻信息
     * @Date: 18:15 2020/7/18
     * @param
     * @return: com.jobpass.common.data.ResultData
     */
    @ApiOperation(value="新闻信息")
    @GetMapping("/journalisminfo")
    public ResultData journalism() {
        List<Journalism> journalisms = journalismService.FindAllJournalism();
        return ResultData.success(journalisms);
    }


}
